package io.renren.modules.app.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.app.dao.YcUserDao;
import io.renren.modules.app.entity.YcUserEntity;
import io.renren.modules.app.service.YcUserService;

import javax.annotation.Resource;


@Service("ycUserService")
public class YcUserServiceImpl extends ServiceImpl<YcUserDao, YcUserEntity> implements YcUserService {
    @Resource
    YcUserDao ycuserDao;


    public PageUtils queryPage(Map<String, Object> params) {
        IPage<YcUserEntity> page = this.page(
                new Query<YcUserEntity>().getPage(params),
                new QueryWrapper<YcUserEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public YcUserEntity getIndividual(Integer userId) {
        return ycuserDao.getIndividual(userId);
    }
}